using Framework.IOC;
using Framework.IOC.Unity;
using Microsoft.Practices.Unity;
using System;
using System.Web.Http;
using Unity.WebApi;

namespace Application.WebAPI
{
    public static class IocConfig
    {
        public static void RegisterComponents()
        {

            // register all your components with the container here
            // it is NOT necessary to register your controllers
            
            // e.g. container.RegisterType<ITestService, TestService>();
            ServiceLocator.RegistAll(AppDomain.CurrentDomain.BaseDirectory + "bin\\");
            //UnityMVC.RegisterMVC();
            GlobalConfiguration.Configuration.DependencyResolver = new UnityDependencyResolver(ServiceLocator.Instance.Container.GetContainerObjcet());
        }
    }
}